import numpy as np


def idf(nd, df):
    return 1 + np.log((1 + nd)/(1 + df))


print(f'2, 2 => {idf(2, 2)}')
print(f'2, 1 => {idf(2, 1)}')